home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2006 May
/
PCWMAY06.iso
/
Software
/
Freeware
/
First Page 2006 3.00
/
fp2006-final-3.00-setup.exe
/
{app}
/
Iscripts
/
Cookie
/
new-to-you.izs
< prev
next >
Wrap
Text File
|
2005-09-28
|
3KB
|
135 lines
<!NOWIZARD>
<!TITLE>New to You
<!/TITLE>
<!DESCRIPTION>This scripts shows you how you can show your visitors whats new since they last visited!<!/DESCRIPTION>
<!CATEGORY>cookies<!/CATEGORY>
<!SCRIPT>
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL NEW TO YOU:
1. Copy code into the HEAD section of document
2. Put last coding into the BODY section of document -->
<!-- STEP ONE: Add code into HEAD section of document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
now = new Date
expireDate = new Date
expireDate.setMonth(expireDate.getMonth()+6)
lastVisit = new Date(cookieVal("pageVisit"))
document.cookie = "pageVisit="+now+";expires=" + expireDate.toGMTString()
function cookieVal(cookieName) {
thisCookie = document.cookie.split("; ")
for (i=0; i<thisCookie.length; i++) {
if (cookieName == thisCookie[i].split("=")[0]) {
return thisCookie[i].split("=")[1]
}
}
return "1 January 1970"
}
function newCheck(yyy,mm,dd) {
lastChgd = new Date(yyy,mm-1,dd)
if (lastChgd.getTime() > lastVisit.getTime()) {
document.write("<img src='/img/new-to-you/new.gif' alt='new'>")
}
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Add code into BODY section of document -->
<BODY>
<p>
<script type="text/javascript" language="JavaScript"> newCheck(2005,2,11)</script> Be sure to check out our new scripts!
<br>
<script type="text/javascript" language="JavaScript"> newCheck(2005,2,3)</script> Have you seen our Tutorials?
</p>
<!-- END OF SCRIPT -->
<!/SCRIPT>
<!PREVIEW>
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL NEW TO YOU:
1. Copy code into the HEAD section of document
2. Put last coding into the BODY section of document -->
<!-- STEP ONE: Add code into HEAD section of document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
now = new Date
expireDate = new Date
expireDate.setMonth(expireDate.getMonth()+6)
lastVisit = new Date(cookieVal("pageVisit"))
document.cookie = "pageVisit="+now+";expires=" + expireDate.toGMTString()
function cookieVal(cookieName) {
thisCookie = document.cookie.split("; ")
for (i=0; i<thisCookie.length; i++) {
if (cookieName == thisCookie[i].split("=")[0]) {
return thisCookie[i].split("=")[1]
}
}
return "1 January 1970"
}
function newCheck(yyy,mm,dd) {
lastChgd = new Date(yyy,mm-1,dd)
if (lastChgd.getTime() > lastVisit.getTime()) {
document.write("<img src='/img/new-to-you/new.gif' alt='new'>")
}
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Add code into BODY section of document -->
<BODY>
<p>
<script type="text/javascript" language="JavaScript"> newCheck(2005,2,11)</script> Be sure to check out our new scripts!
<br>
<script type="text/javascript" language="JavaScript"> newCheck(2005,2,3)</script> Have you seen our Tutorials?
</p>
<!-- END OF SCRIPT -->
<!/PREVIEW>
<!RELATED>new.gif<!/RELATED>